package com.bigdata.management.mapper;

import com.bigdata.management.bean.Customer;
import org.apache.ibatis.annotations.*;

import java.util.List;


public interface CustomerMapper {

    @Select("select * from customer")
    public List<Customer> getCustomer();

    @Insert("insert into customer(name,age) values (#{customer.name}, #{customer.age} )")
    public void insertCustomer(@Param("customer") Customer customer);

    @Update("update customer set age=#{customer.age} where name=#{customer.name}")
    public void updateCustomer(@Param("customer") Customer customer);
}
